//
//  GJFIntroCollectionViewCell.m
//  Wedding
//
//  Created by 郭静芬 on 2017/1/13.
//  Copyright © 2017年 郭静芬. All rights reserved.
//

#import "GJFIntroCollectionViewCell.h"

@interface GJFIntroCollectionViewCell ()
@end

@implementation GJFIntroCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.contentView).mas_offset(65 * XX);
            make.right.mas_equalTo(self.contentView).mas_offset(-65 * XX);
            make.top.mas_equalTo(self.contentView).mas_offset(20 * YY);
            make.height.mas_offset(HEIGHT / 3 * 2 - 40 * YY);
            
        }];
        [self.label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.contentView).mas_offset(60 * XX);
            make.right.mas_equalTo(self.contentView).mas_offset(-60 * XX);
            make.top.mas_equalTo(self.imageV.mas_bottom).mas_offset(60 * YY);
            make.height.mas_offset(30 * YY);
            
        }];

    }
    return self;
}

- (UIImageView *)imageV {
    if (!_imageV) {
        _imageV = [[UIImageView alloc] init];
        _imageV.layer.cornerRadius = 5 * YY;
        _imageV.clipsToBounds = YES;
        [self.contentView addSubview:_imageV];
    }
    return _imageV;
}
- (UILabel *)label {
    if (!_label) {
        _label = [[UILabel alloc] init];
        _label.font = [UIFont systemFontOfSize:16 * XX];
        _label.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_label];
    }
    return _label;
}
@end
